From: Antonio Nino Diaz Date: Thu, 18 Oct 2018 23:57:10 +0000 (+0100) Subject: libc: Integrate strrchr in libc X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=1a29aba3673b753664e97fcfed1e3d38f138b3b7;p=project%2Fbcm63xx%2Fatf.git libc: Integrate strrchr in libc Change-Id: I3ddc07cb02d73cd7614af7a5b21827aae155f9a0 Signed-off-by: Antonio Nino Diaz --- diff --git a/include/lib/libc/string.h b/include/lib/libc/string.h index 050f6438..3c8e3b65 100644 --- a/include/lib/libc/string.h +++ b/include/lib/libc/string.h @@ -27,5 +27,6 @@ char *strchr(const char *s, int c); void *memset(void *dst, int val, size_t count); size_t strlen(const char *s); size_t strnlen(const char *s, size_t maxlen); +char *strrchr(const char *p, int ch); #endif /* STRING_H */ diff --git a/lib/libc/libc.mk b/lib/libc/libc.mk index 554f36bb..daa2ec10 100644 --- a/lib/libc/libc.mk +++ b/lib/libc/libc.mk @@ -21,7 +21,8 @@ LIBC_SRCS := $(addprefix lib/libc/, \ strcmp.c \ strlen.c \ strncmp.c \ - strnlen.c) + strnlen.c \ + strrchr.c) INCLUDES += -Iinclude/lib/libc \ -Iinclude/lib/libc/$(ARCH) \ diff --git a/lib/libc/strrchr.c b/lib/libc/strrchr.c index 6afb8c1a..cd435ff3 100644 --- a/lib/libc/strrchr.c +++ b/lib/libc/strrchr.c @@ -29,12 +29,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)rindex.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); - #include #include @@ -53,5 +47,3 @@ strrchr(const char *p, int ch) } /* NOTREACHED */ } - -__weak_reference(strrchr, rindex);